﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;

namespace CameraSystem
{
    public class ToolClass
    {
        public static void UpdateCodeNum(string path)
        {
            try
            {
                XmlDocument xmlDocument = new XmlDocument();
                xmlDocument.Load(Form1.paraPath);

                XmlNodeList xmlNode = xmlDocument.SelectSingleNode("IniParameters").ChildNodes;

                foreach (XmlNode item in xmlNode)
                {
                    if (item.Name.ToLower() == "scantime")
                    {
                        item.InnerText = path;
                        break;
                    }
                }




                xmlDocument.Save(Form1.paraPath);
            }
            catch { MessageBox.Show("数据读取异常"); }

        }
    }
}
